package io.itit.ecp.admin.provide.action.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.itit.grass.common.provide.action.validation.IAdd;
import io.itit.grass.common.provide.action.validation.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：设备管理-预警参数
 * @Date：Create by 2023-12-04 15:28:53
 */
@Data
@ToString
@ApiModel("设备管理-预警参数")
public class DeviceWarningReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @Null(groups = IAdd.class)
    @NotBlank(groups = IUpdate.class)
    @ApiModelProperty("主键")
    private String id;

    @NotBlank
    @ApiModelProperty("预警名称")
    private String warningName;

    @NotBlank
    @ApiModelProperty("项目Id")
    private String sceneProjectId;

    @NotBlank
    @ApiModelProperty("楼栋Id")
    private String sceneEdificeId;

    @ApiModelProperty("楼层Id")
    private String sceneFloorId;

    @ApiModelProperty("空间Id")
    private String sceneRoomId;

    @ApiModelProperty("预警等级")
    private String thresholdLevel;

    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty("开始时间")
    private Date startTime;

    @NotNull
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ApiModelProperty("结束时间")
    private Date endTime;

    @NotBlank
    @ApiModelProperty("机构Id")
    private String deptId;

    @NotBlank
    @ApiModelProperty("推送目标Ids")
    private List<String> userIds;

    @NotBlank
    @ApiModelProperty("预警阀值及预警等级json")
    private String warningJson;

}
